import { createRouter, createWebHistory } from 'vue-router'

import Login from '@/views/Login.vue'
import Password from '@/views/Password.vue'
import Register from '@/views/Register.vue'
import Confirm from '@/views/Confirm.vue'

import Help from '@/details/Help.vue'
import Guide from '@/details/Guide.vue'
import Application from '@/details/Application.vue'
import Inquiry from '@/details/Inquiry.vue'
import Addfamily from '@/details/Addfamily.vue'
import Vselete from '@/village/Vselete.vue'
import AdminManagement from '@/details/AdminManagement.vue'
import RoleManagement from '@/details/RoleManagement.vue'
import CadreManagement from '@/details/CadreManagement.vue'


import PClueManagement from '@/views/Province/PClueManagement.vue'
import Visualization from '@/views/Province/Visualization.vue'

import ClueProcessing from '@/views/CityCounty/ClueProcessing.vue'
import Interview from '@/village/Interview.vue'
import InterviewList from '@/village/InterviewList.vue'
import Clue from '@/village/Clue.vue'
import PCselete from '@/details/PCselete.vue'
const routes = [
  {path: '/', redirect: '/login'},
  {path: '/', redirect: '/login'},

  {
    path: '/',
    name: '首页',
    component: () => import('@/layout/Layout.vue'),
    children: [
            {
        path:'/addfamily',
        name:'添加家庭成员',
        component:Addfamily
      },
      {
        path:'/interview',
        name:'录入走访信息',
        component:Interview
      },
      {
        path: '/help',
        name: '帮扶政策详情',
        component: Help
      },
      {
        path: '/application',
        name: '自主申报',
        component: Application
      },
      {
        path: '/guide',
        name: '申报指南',
        component: Guide
      },
      {
        path: '/inquiry',
        name: '申报结果查询',
        component: Inquiry
      },
      {
        path: '/AdminManagement',
        name: '管理员管理',
        component: AdminManagement
      },
      {
        path: '/RoleManagement',
        name: '角色管理',
        component: RoleManagement
      },
      {
        path: '/CadreManagement',
        name: '干部管理',
        component: CadreManagement
      },
      {
        path: '/PClueManagement',
        name: '省级干部线索管理',
        component: PClueManagement
      },{
        path: '/Visualization',
        name: '可视化分析',
        component: Visualization
      },
      {
        path: '/ClueProcessing',
        name: '市县干部线索处理',
        component: ClueProcessing
      },
      {
        path:'/vselete',
        name:'查询贫困户信息',
        component: Vselete
      },
      {
        path:'/interviewList',
        name:'查看走访信息',
        component:InterviewList
      },
      {
        path:'/clue',
        name:'乡村干部线索处理',
        component:Clue
      },
      {

        path:'/pcselete',
        name:'查看贫困户信息',
        component:PCselete
      }
    ]
  },
  {
    path: "/login",
    name: "login",
    component: Login
  },

  {
    path: "/password",
    name: "Password",
    component: Password
  },
  {
    path: "/register",
    name: "Register",
    component: Register
  },
  {
    path: "/confirm",
    name: "Confirm",
    component: Confirm
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
